//
// Created by guoxh on 2019-09-12.
//
#include <iostream>
#include <stdio.h>
using namespace std;
class  Time{
public:
    Time();//构造方法
    void setTime(int,int,int);
    void displayTime();

private:
    int hour;
    int minute;
    int second;
};

Time::Time(){
    hour = 0;
    minute = 0;
    second = 0;
};

void Time::setTime(int h, int m , int s) {
    this->hour = h;
    this->minute = m;
    this->second = s;
}

void Time::displayTime() {
    cout<<this->hour<<":"<<this->minute<<":"<<this->second<<endl;
}

int main(){
    Time t1;
    t1.setTime(12,20,30);
    t1.displayTime();
}